<?php
    include_once 'fun.php';
    include_once 'islogin.php';
    $_SESSION['isadmin']=isset($_SESSION['isadmin'])?$_SESSION['isadmin']:'';
  if ($_SESSION['isadmin']!=2&&$_SESSION['isadmin']!=-1) {
      header('Refresh:1;url=shop.php');
      die("请以柜台管理员身份登录");
  }
    $id=$_GET['id'];
    $con=connect();
    $sql = "delete from counter where counterid = '{$id}'";

    query($sql,$con);
    $sql = "delete from cou_man where counterid = '{$id}'";
    query($sql,$con);
    echo "<script>
			
			location.href='counter.php';
	</script>";
?>